package org.dochandler.test.dao.dummy;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.dochandler.dao.DocumentDAO;
import org.dochandler.service.domain.Document;
import org.dochandler.service.domain.Sensitivity;

@SuppressWarnings("serial")
public class DummyDocumentDAO implements DocumentDAO {

	@Override
	public Document findById(Long entityId) {
		Document document = new Document();
		document.setSensitivity(Sensitivity.SECRET);
		document.setContent("This is a secret content: " + entityId);
		document.setTitle("Secret title " + entityId);
		document.setCreationDate( new Date() );
		return document;
	}

	@Override
	public List<Document> findAll() {
		List<Document> docList = new ArrayList<Document>();

//		long i = 0;
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
//		docList.add( new Document(++i, Sensitivity.SECRET, "Title "+ i, "Content " + i, new Date() ) );
		
		return docList;
	}

	@Override
	public boolean create(Document entity) {
		return true;
	}

	@Override
	public boolean delete(Long entityId) {
		return false;
	}

	@Override
	public boolean update(Document entity) {
		return false;
	}
}